<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> 后台管理开发框架</title>
<link href="/favicon.ico" rel="icon">
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="/static/admin/layui/css/layui.css" rel="stylesheet" type="text/css" />
<link href="/static/admin/css/style.css" rel="stylesheet" type="text/css" />
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- // 重定位style -->
<link href="__STATICADMIN__css/content.css?" rel="stylesheet" type="text/css" />
<div class="layui-fluid">
    <form class="layui-form layui-card" >

        <div class="layui-card-body">
        <gt name="$data.id" value="0">
            <input type="text" name="id" value="{$data.id}" hidden="">
            <else/>
            <input type="text" name="id" value="" hidden="">
        </gt>
        
            <div class="layui-tab layui-tab-brief"  >
                <ul class="layui-tab-title">
                  <li class="layui-this">常规选项</li>
                  <li>高级选项</li>
                  <li>栏目内容</li>
                </ul>
                <div class="layui-tab-content" >
                    <div class="layui-tab-item layui-show">
                        <div class="layui-fl">
                            <div class="layui-form-item"> 
                                <label class="layui-form-label">栏目模型</label>
                                <div class="layui-input-inline">
                                    <select name="cid"  lay-verify="required" >
                                        <option value="">请选择模型</option>
                                        <salibs:channel id="vo">
                                            <option value="{$vo.id}" <if condition="$vo['id'] eq $data['cid']"> selected </if> >{$vo.title}</option>
                                        </salibs:channel>
                                    </select>
                                </div>
                            </div> 
                            <div class="layui-form-item"> 
                                <label class="layui-form-label">栏目分类</label>
                                <div class="layui-input-inline">
                                    <div id="pid"></div>
                                </div>
                            </div>
                            <div class="layui-form-item"> 
                                <label class="layui-form-label">栏目名称</label>
                                <div class="layui-input-inline">
                                    <input name="title"  type="text" class="layui-input" value="{$data.title}"  lay-verify="required"
                                     placeholder="请填写栏目名称"/>
                                </div>
                            </div>
                        </div>

                        <div class="layui-fl">

                            <div class="layui-form-item"> 
                                <label class="layui-form-label">排&emsp;序</label>
                                <div class="layui-input-inline">
                                    <input name="sort" type="number" class="layui-input" value="{$data.sort}" placeholder="默认生成" />
                                </div>
                            </div>   
                            <div class="layui-form-item"> 
                                <label class="layui-form-label">{:__('权&emsp;限' )}</label>
                                <div class="layui-input-inline">
                                    <div id="access"></div>
                                </div>
                            </div>
                            <div class="layui-form-item"> 
                                <label class="layui-form-label">拼&emsp;音</label>
                                <div class="layui-input-inline">
                                    <input name="pinyin"  type="text" class="layui-input" value="{$data.pinyin}" placeholder="默认生成" />
                                </div>  
                            </div>
                        </div>


                        <div class="layui-form-item"> 
                            <label class="layui-form-label">栏目图片</label>
                            <div class="layui-input-inline wid650" >
                                <input name="image" type="text" class="layui-input pic" value="{$data.image}" placeholder="请上传或直接粘贴图片地址"/>
                            </div>
                            <button type="button" class="layui-btn layui-btn-normal" lay-upload="" lay-input="pic">上传图片</button>
                        </div>
                        <div class="layui-form-item"> 
                                <label class="layui-form-label">标&emsp;题</label>
                                <div class="layui-input-inline wid650">
                                    <input name="seo_title" type="text" class="layui-input" value="{$data.seo_title}"  placeholder="请填写SEO标题" />
                                </div>
                            </div>
                        <div class="layui-form-item"> 
                            <label class="layui-form-label">关键字</label>
                            <div class="layui-input-inline wid650">
                                <input name="seo_words" type="text" class="layui-input" value="{$data.seo_keywords}" placeholder="请填写SEO关键字"/>
                            </div>
                        </div>

                        <div class="layui-form-item"> 
                            <label class="layui-form-label">描&emsp;述</label>
                            <div class="layui-input-inline wid650">
                                <textarea  name="seo_description" style="height: 50px;" class="layui-textarea" placeholder="请填写SEO描述信息" >{$data.seo_description}</textarea>
                            </div>
                        </div>

                        <div class="layui-form-item"> 
                            <label class="layui-form-label">跳转网址</label>
                            <div class="layui-input-inline wid650">
                                <input name="jumpurl" type="text" class="layui-input" value="{$data.jumpurl}" placeholder="http://"/>
                            </div>
                        </div>  
                    </div>

                    <div class="layui-tab-item">

                        <div class="layui-form-item">
                            <label class="layui-form-label" >投稿选项</label>
                            <div class="layui-input-inline" >
                                 <input type="radio" name="contribute"   
                                 value="1" title="是"  <if condition="$data.contribute eq 1 "> checked </if> >
                                 <input type="radio" name="contribute"   
                                 value="0" title="否" <if condition="$data.contribute eq 0 "> checked </if> >
                            </div>   
                            <div class="layui-form-mid layui-word-aux">* 是否开启会员投稿支持！</div>                
                        </div> 

                        <div class="layui-form-item">
                            <label class="layui-form-label" >是否单页面</label>
                            <div class="layui-input-inline" >
                                 <input type="radio" name="single"   
                                 value="1" title="是"  <if condition="$data.single eq 1 "> checked </if> >
                                 <input type="radio" name="single"   
                                 value="0" title="否" <if condition="$data.single eq 0 "> checked </if> >
                            </div>   
                            <div class="layui-form-mid layui-word-aux">* 当前栏目是否为单页面形式</div>                
                        </div> 

                        <div class="layui-form-item">
                            <label class="layui-form-label">独立模板</label>
                            <div class="layui-input-inline">
                                <select name="skin">
                                    <option value=""></option>
                                    <volist name="skin" id="vo">
                                        <option value="{$vo}" <if condition="$vo eq $data['skin']"> selected </if> >{$vo}</option>
                                    </volist>
                                </select>
                            </div>
                            <div class="layui-form-mid layui-word-aux" style="color: red!important;">* 自定义模板请在app/index/view/cagetory编写</div> 
                        </div>  

                    </div>

                    <div class="layui-tab-item">
                        <blockquote class="layui-elem-quote">说明：栏目内容是替代原来栏目单页模型的一种灵活方式，可在模板中使用标签调用内容，通常用户企业简介等！</blockquote>
                        <textarea id="content" name="content" />{$data.content}</textarea>
                    </div>
              </div>
          </div>
          </div>
    
        <div class="layui-footer layui-form-footer">
            <button class="layui-btn layui-btn-primary" type="button" pa-event="closeDialog">取消</button>
            <button class="layui-btn" lay-filter="submitIframe" lay-submit>提交</button>
        </div>
    </form>
</div>
<script src="/static/admin/layui/layui.js?v=1.0.0"></script>
<script src="/static/admin/js/common.js?v=1.0.0"></script>
<script src="/static/admin/module/xmselect/xmselect.js"></script>
<script src="/static/js/tinymce/tinymce.min.js"></script>
<script>
    var grouplist = {:get_usergroup_json()};
    var categorylist = {:get_category_json()};  
</script>
<script>
    layui.use(['content'],function () {
        
        var content = layui.content;
        // 常规元素渲染
        content.tinymce('content');
        content.xmselect('access',grouplist,[{$data.access}]);
        content.xmselect('pid',categorylist,[{$data.pid}],false);
    });
</script>